import java.net.InetAddress;
import java.net.UnknownHostException;

public class NetDemo {
    public static void main(String[] args) throws UnknownHostException {
        InetAddress[] devices = InetAddress.getAllByName("ScienceStardeMacBook-Pro.local");
        for (InetAddress device: devices) {
            System.out.println(device.getCanonicalHostName());
        }
    }
}
